<template>
  <div>
    <Jcstyle v-for="list in lists"
             :key="list.id"
             :list="list"></Jcstyle>
  </div>
</template>

<script>
import Jcstyle from '@/components/jcmodule/jcstyle'
export default {
  data () {
    return {
      lists: [],
      tabid: ''
    }
  },
  created () {
    console.log(this.$route.params.id)
    this.tabid = this.$route.params.id
    this.onLoad();
  },
  beforeRouteUpdate (to, from, next) {
    this.tabid = to.params.id
    this.onLoad()
    next()
  },
  methods: {
    onLoad () {
      this.$http.getjcList(this.tabid).then(resp => {
        this.lists = resp[this.tabid]
        console.log(this.lists)
      })
    }
  },
  components: {
    Jcstyle
  }
}
</script>

<style>
</style>